package com.yan.deezer.network;

import java.util.List;

import org.apache.http.client.methods.HttpGet;

import com.yan.deezer.data.object.Album;
import com.yan.deezer.data.object.Artist;
import com.yan.deezer.data.object.Track;

public class HttpService {
	private final static String TAG = "HTTP_SERVICE";

	public static List<Artist> getArtistList(String userInput) throws Exception {
		HttpGet request = RequestBuilder.getArtistsQuery(userInput);

		List<Artist> artistList = ResponseBuilder.getArtistList(request);
		return artistList;
	}

	public static List<Album> getArtistAlbumList(String artistID)
			throws Exception {
		HttpGet request = RequestBuilder.getArtistAlbumsQuery(artistID);

		List<Album> albumList = ResponseBuilder.getArtistAlbumList(request);
		return albumList;
	}

	public static List<Track> getAlbumTrackList(String albumID)
			throws Exception {
		HttpGet request = RequestBuilder.getAlbumTracksQuery(albumID);
		List<Track> trackList = ResponseBuilder.getAlbumTrackList(request);
		return trackList;
	}

}
